headlamp-plugin: add opt-in --with-claude-skills to create/upgrade#6096
Open
yolossn wants to merge 1 commit into
Open
headlamp-plugin: add opt-in --with-claude-skills to create/upgrade#6096yolossn wants to merge 1 commit into
yolossn wants to merge 1 commit into
Conversation
Scaffolds a Claude Code agent harness (CLAUDE.md, .claude/skills, .claude/settings.json, .mcp.json) when the flag is passed; default scaffold path is unchanged. CLAUDE.md replaces AGENTS.md when present. Signed-off-by: yolossn <sannagaraj@microsoft.com>
b6feab5 to
0de15ca
Compare
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yolossn The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
headlamp-plugin: opt-in Claude Code agent harness (
--with-claude-skills)What
Adds an opt-in
--with-claude-skillsflag toheadlamp-plugin createandheadlamp-plugin upgradethat scaffolds a Claude Code agent harness forbuilding a Headlamp plugin with an AI agent.
The harness:
create-cncf-plugin,plan-plugin,define-resource,add-list-view,add-detail-view,add-settings,ensure-dependency,seed-test-data,run-and-verify,document-pluginHow
template-claude/folder (shipped viapackage.json
files), so the default scaffold path is byte-for-byteunchanged unless the flag is passed.
create --with-claude-skillscopies it over the fresh scaffold.upgrade --with-claude-skillsopts an existing plugin in, adding onlymissing files (
overwrite: false) so user customizations are preserved —safe to re-run.
is dropped on add, and
upgrade'saddMissingTemplateFilesno longerreintroduces AGENTS.md once CLAUDE.md exists.
Demo
Video.Project.7.mp4
Usage
Tests
test-headlamp-plugin.js(harness added,AGENTS.md dropped, no-flag upgrade doesn't reintroduce AGENTS.md).
npm pack --dry-runships alltemplate-claude/files (incl. the.claude/dotdir and.mcp.json).How to test manually
Setup
Run from the
headlamp-pluginpackage dir:1. Default
createis unchanged (regression guard)Expect: AGENTS.md present; no CLAUDE.md / .mcp.json / .claude.
2.
create --with-claude-skillsadds the harness, drops AGENTS.mdExpect: CLAUDE.md + .mcp.json + .claude/settings.json + 10 skills; no AGENTS.md; default scaffold files still present.
3.
upgrade --with-claude-skillsopts an existing plugin inExpect: harness added, AGENTS.md dropped.
4. Safety: plain
upgrade(no flag) doesn't disturb a harness pluginExpect: AGENTS.md stays gone, CLAUDE.md intact (the guard at work).
Optional — confirm a plain upgrade on a default plugin still re-adds AGENTS.md if deleted:
5.
--helpshows the new options6. Packaging — the harness ships in the npm tarball
7. (Optional) Full automated suite
This runs the create/upgrade assertions plus build/lint/tsc/storybook — slow (does real installs), needs network:
cd plugins/headlamp-plugin node test-headlamp-plugin.js8. (Optional) Real load test in Headlamp
For a true smoke test of a generated harness plugin (not just file checks):
Cleanup